import std.stdio;
 
void main()
{
 
    int sayi = 0, sim = 0, once = 1, once2 = 1;
 
    while (sim <= 4000000) {
        sim = once + once2;
        once2 = once;
        once = sim;
 
        if (!(sim & 1)) {
            sayi += sim;
        }
    }
 
    writeln(sayi);
}
